//
//  QWNavBarTranslucent.m
//  WJCommon-master
//
//  Created by Yunhai.Wu on 16/1/18.
//  Copyright © 2016年 WJ. All rights reserved.
//

#import "QWNavBarTranslucent.h"

@implementation QWNavBarStatusAttributes

-(instancetype)initTintColor:(UIColor *)tintColor barBackgroundImage:(UIImage *)barBackgroundImage shadowImage:(UIImage *)shadowImage isTranslucent:(BOOL)isTranslucent titleTextAttributes:(NSDictionary *)titleTextAttributes statusBarStyle:(UIStatusBarStyle)statusBarStyle {
    self = [super init];
    if (self) {
        self.tintColor = tintColor;
        self.barBackgroundImage = barBackgroundImage;
        self.shadowImage = shadowImage;
        self.isTranslucent = isTranslucent;
        self.titleTextAttributes = titleTextAttributes;
        self.statusBarStyle = statusBarStyle;
    }
    return self;
}

-(instancetype)initNavigationBar:(UINavigationBar *)navigationBar {
    self = [super init];
    if (self) {
        self.tintColor = navigationBar.tintColor;
        self.barBackgroundImage = [navigationBar backgroundImageForBarMetrics:UIBarMetricsDefault];
        self.shadowImage = [navigationBar shadowImage];
        self.isTranslucent = [navigationBar isTranslucent];
        self.titleTextAttributes = [navigationBar titleTextAttributes];
        self.statusBarStyle = [[UIApplication sharedApplication] statusBarStyle];
    }
    return self;
}

@end
